ADD_CUSTOM_COMMAND(OUTPUT  COPY_QML
	COMMAND echo "Coping FlatUI qml files..."
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI
	COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${QMLPLUGINDIR}/FlatUI/
	COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/FlatGlobal.qml ${QMLPLUGINDIR}/FlatUI/
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI/component
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/component ${QMLPLUGINDIR}/FlatUI/component/  
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI/element
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/element ${QMLPLUGINDIR}/FlatUI/element/ 
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI/Private
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Private ${QMLPLUGINDIR}/FlatUI/Private/  
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI/Resource
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resource ${QMLPLUGINDIR}/FlatUI/Resource/  
	COMMAND ${CMAKE_COMMAND} -E make_directory ${QMLPLUGINDIR}/FlatUI/ttf
	COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/ttf ${QMLPLUGINDIR}/FlatUI/ttf/  
)  

FILE(GLOB_RECURSE qml_files "${CMAKE_CURRENT_SOURCE_DIR}/*.qml")
FILE(GLOB_RECURSE png_files "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
FILE(GLOB_RECURSE ttf_files "${CMAKE_CURRENT_SOURCE_DIR}/*.ttf")
FILE(GLOB_RECURSE otf_files "${CMAKE_CURRENT_SOURCE_DIR}/*.otf")
ADD_CUSTOM_TARGET(FlatUI ALL 
	DEPENDS COPY_QML
	SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/qmldir
			${CMAKE_CURRENT_SOURCE_DIR}/Private/qmldir
			${qml_files}
			${png_files}
			${ttf_files}
			${otf_files}
			)        